package com.mybatisplus.demo.design_patterns.section_7;

public class ConcreteBuilder implements Builder {

    private final Product product = new Product();

    @Override
    public void buildGround() {
        System.out.println("build地基");
        product.setGround("build地基");
    }

    @Override
    public void buildCement() {
        System.out.println("build水泥");
        product.setCement("build水泥");
    }

    @Override
    public void buildRoof() {
        System.out.println("build楼顶");
        product.setRoof("build楼顶");
    }

    @Override
    public Product buildProduct() {
        System.out.println("建造完毕!");
        return product;
    }

    @Override
    public void buildAll() {
        System.out.println("搭建所有的");
    }
}
